package org.eduapp.trains.service.log;

import org.eduapp.trains.ServiceException;
import org.eduapp.trains.model.logs.ModelLogs;
import org.eduapp.trains.web.support.PaginationSupport;

/**
 * 
 * @author jeccy
 *
 */
public interface LogService {
	
	/**
	 * get log by given id
	 * @param id
	 * @return
	 * @throws ServiceException
	 */
	ModelLogs get (String id) 
		throws ServiceException;
	
	/**
	 * get logs by pager
	 * @param model
	 * @param pageSize
	 * @param offset
	 * @param order
	 * @param isDesc
	 * @return
	 * @throws ServiceException
	 */
	PaginationSupport<ModelLogs> get (ModelLogs model, int pageSize, int offset, String order, Boolean isDesc)
		throws ServiceException;
	
	/**
	 * remove log by given id
	 * @param id
	 * @return
	 * @throws ServiceException
	 */
	boolean remove (String id)
		throws ServiceException;
	
	/**
	 * save or update log by given model
	 * @param model
	 * @return
	 * @throws ServiceException
	 */
	boolean saveOrUpdate (ModelLogs model)
		throws ServiceException;
}
